<?php

/**
 * Maikuro CMS
 *
 * LICENSE:
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * The license is bundled with this package in the file LICENSE.txt.
 * You may also obtain a copy of the License at this URL:
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * @copyright  Copyright (c) 2010, Jonathan Hedrén
 * @author     Jonathan Hedrén <jonathan.hedren@gmail.com>
 * @license    http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
 */


    if (!isset($pageId)) {
        $pageId = str_replace('/', '-', $this->getName());
        if ($this->getModule() !== null) {
            $pageId = $this->getModule() . '-' . $pageId;
        }
    }
    $baseUrl = $request->getApplicationPath();
?>
<!doctype html>
<html lang="en">
    <?php $this->renderSnippet('head'); ?>
    <body id="<?php echo $pageId; ?>" class="system">
        <div id="page">
            <?php
                $this->renderSnippet('header', array('pageId' => $pageId));
                $this->renderSnippet('menu', array('activeTopMenuItem' => 'system'));
            ?>
            <div id="content">
                <?php $this->renderSnippet('messenger'); ?>
                <div id="content-inner">
                    <?php echo $this->getOutput(); ?>
                </div>
            </div>
            <div id="footer">
                <div id="footer-inner">
                    <p><a href="http://maikuro.org">Maikuro CMS</a> &copy; 2010 Jonathan Hedrén</p>
                </div>
            </div>
        </div>
<!--
<?php
    echo "Final memory usage: ".memory_get_usage()." bytes <br />";
    echo "Peak memory usage: ".memory_get_peak_usage()." bytes <br /";
?>
-->
    </body>
</html>